app.controller('claimLandlordCtrl', function($element, ngDialog, $scope, $state, rest, user, uploadConf, tipService, uiLoad, $localStorage, $window) {
  var data = angular.copy($scope.ngDialogData, {});
  var token = $window.localStorage.getItem("token");
  var userId = $window.localStorage.getItem("id");
     // console.log(userId)

  $scope.params = {
    landlordId: data.landlordId,
    pointPersonId:userId
  };

  //点击确定按钮
  $scope.modifySure = function() {
    rest.decoJava({
      url: '/tenancy-sys/landlord/pointPersonLandlordCheck',
      data: $scope.params,
      type: 'post',
      beforeSend: function(request) {
        request.setRequestHeader("token", token);
      },
      success: function(res) {
        // alert(userId);
        if (res.code == 0) {
          $scope.closeThisDialog({
            clickOk: true
          });
        } else {

        }
      },
      error: function() {
        // btn.removeClass('disabled');
      }
    });
  }

});